% Needed for: \varovee, etc
\usepackage{stmaryrd}

% Needed for: \mathscr{}
\usepackage{mathrsfs}



\newcommand{\shrule}{\vspace{0.5mm}\hrule\vspace{0.5mm}}
\newcommand{\out}{\overline}

%% CaSE macros

\newcommand{\lts}[4]{\langle {#1},{#2},{#3},{#4} \rangle}   

\newcommand{\derives}[1]{\stackrel{#1}{\rightarrow}}
\newcommand{\lderives}[1]{\stackrel{#1}{\longrightarrow}}
\newcommand{\xderives}[1]{\xrightarrow{#1}}
\newcommand{\nderives}[1]{\stackrel{#1}{\nrightarrow}}

\newcommand{\expr}{\text{$\mathcal{E}$}}
\newcommand{\exprb}{\text{$\mathcal{F}$}}
\newcommand{\bouncer}{\text{$\mathcal{F}$}}
\newcommand{\ambop}{\text{$\mathcal{M}$}}
\newcommand{\bambop}{\text{$\mathcal{N}$}}
\newcommand{\procs}{\text{$\mathcal{P}$}}
\newcommand{\timers}{\text{$\mathcal{T}$}}
\newcommand{\labels}{\text{$\mathcal{L}$}}
\newcommand{\names}{\text{$\mathcal{N}$}}
\newcommand{\lowpris}{\text{$\mathcal{C}$}}
\newcommand{\highpris}{\text{$\mathcal{H}$}}
\newcommand{\independent}{\text{$\mathcal{U}$}}
\newcommand{\conames}{\text{$\overline{\names}$}}
\newcommand{\actions}{\text{$\mathcal{A}$}}
\newcommand{\symbols}{\text{$\mathcal{S}$}}

\newcommand{\nil}{\textbf{0}}
\newcommand{\pref}{\,.\,}
\newcommand{\res}[1]{\setminus {#1}}
\newcommand{\hide}[1]{/ \{{#1}\}}
\newcommand{\timeout}[3]{\lfloor{#1}\rfloor {#2} ({#3})}
\newcommand{\stimeout}[3]{\lceil{#1}\rceil {#2} ({#3})}

\newcommand{\eqdef}{\mathrel{~=_\mathrm{def}~}}

\newcommand{\twb}[1]{\approx_{#1}}
\newcommand{\toc}[1]{\approx^{c}_{#1}}

%% operational rules
 
% Derivation Rules
% 1. parameter is name
% 2. parameter is premise
% 3. parameter is conclusion
% 4. parameter is side conditions
%
\newlength{\lrulename}
\setlength{\lrulename}{0.80cm}
 
\newcommand{\Rule}[4]{{#1}&$\displaystyle\frac{#2}{#3}\,{#4}$}
\newcommand{\Rulea}[4]{{#1}\quad$\displaystyle\frac{#2}{#3}\,{#4}$}

% Locality

\newcommand{\loc}[4]{{#1}[ #2 ]^{#3}_{\{#4\}}}
\newcommand{\locv}[4]{{#1}[ #2 ]^{#3}_{#4}}

%% misc macros

\newcommand{\seml}{[\hspace{-0.3ex}[}
\newcommand{\semr}{]\hspace{-0.3ex}]}
\newcommand{\sem}[4]{{}_{#2}\seml #1 \semr^{#3}_{#4}}

\newcommand{\procin}[2]{on\ #1 \tntin{#2}}
\newcommand{\procout}[2]{on\ #1 \tntout{#2}}
\newcommand{\sprocin}[2]{\tntin{#1}\ {#2}}
\newcommand{\sprocout}[2]{\tntout{#1}\ {#2}}
\newcommand{\bin}{\overline{\varovee}}
\newcommand{\bout}{\overline{\varowedge}}
\newcommand{\bopen}{\overline{\varoast}}
\newcommand{\tntin}[1]{\tin #1}
\newcommand{\tntout}[1]{\tout #1}
\newcommand{\tntopen}[1]{\topen #1}
\newcommand{\tin}{\varovee}
\newcommand{\tout}{\varowedge}
\newcommand{\topen}{\varoast}
\newcommand{\mobprim}{\text{$\{ \tin, \tout , \topen\}$}}
\newcommand{\pc}{\mid}

